﻿<base target="_self">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="Asset.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/Core.js"></script>
<script type="text/javascript" src="swiff/Swiff.Base.js"></script>
<script type="text/javascript" src="swiff/Swiff.Uploader.js"></script>
<script type="text/javascript" src="js/FancyUpload_s.js"></script>
<script type="text/javascript" src="js/UrlEncodeDecode.js"></script>
<script>
	if(navigator.appName.indexOf('Microsoft')!=-1)
		var sLang=dialogArguments.sLang;
	else
		var sLang=window.opener.sLang;
	document.write("<scr"+"ipt src='language/"+sLang+"/upload.js'></scr"+"ipt>");

function refresh()
	{
	if(navigator.appName.indexOf('Microsoft')!=-1)
		dialogArguments.refreshAfterDelete('');
	else
		window.opener.refreshAfterDelete('');
	}
function getCurrFolder()
{
	if(navigator.appName.indexOf('Microsoft')!=-1)
		UploadForm.elements.inpCurrFolder.value=URLEncode(dialogArguments.selCurrFolder.value);
	else
		UploadForm.elements.inpCurrFolder.value=URLEncode(window.opener.document.getElementById("selCurrFolder").value);
}

</script>
<script>writeTitle()</script>

<script type="text/javascript">
var upload_image = false;
function windown_unload()
{    
    if(upload_image == true)
    {
        opener.location.reload();
        upload_image = false;
    }
}
function reload_page()
{
    opener.location.href = "/office/photodetailupload/"+document.getElementById("inpCurrFolder").value+".chn";
}

window.addEvent('load', function()
{
	var input = $('inpFile');
	var uplooad = new FancyUpload(input, {		
		url: '/AssetManager/upload_prc_photoalbum.asp' + '?f=' +  document.getElementById('inpCurrFolder').value + '&n=' + document.getElementById('inpNewFolder').value,		
		swf: '/AssetManager/swiff/Swiff.Uploader.swf',
		queueList: 'upload-queue',
		container: $E('span'),
		limitSize: '10000000',
		limitFiles: '10'
	});	
	$('done').adopt(new Element('a', {
		href: 'javascript:void(null);',
		events: {
			click: uplooad.clearList.bind(uplooad, [false])
		}
	}).setHTML('<input type=\'button\' value=\'Làm sạch danh sách\'>'));
});
</script>
</head>
<body onunload="windown_unload()" onLoad="upload_image = false; getCurrFolder()" style="overflow:hidden;margin:0;">

<table width=100% height=100% align=center style="" cellpadding=0 cellspacing=0>
<tr>
<td valign=top style="padding-top:5px;padding-left:15px;padding-right:15px;padding-bottom:12px;height=100%">
<div id="container">
<span></span>
<form method="post" enctype="multipart/form-data" id="UploadForm" name="UploadForm">	
	<span id="txtLang">Tải nhiều file</span>: <input type="file" name="inpFile" id="inpFile"/>
    <input type="hidden" id="inpCurrFolder" name="inpCurrFolder" value="<%=request.querystring("id")%>" />
    <input type="hidden" id="inpNewFolder" name="inpCurrFolder" value="<%=request.querystring("sNewFolder")%>" />
    <input type="submit" class="submit" id="profile-submit" value="Tải ảnh"/><br />
    <div id="upload-status" align="center"><br />
						Chọn tất cả các file cần tải thông qua <b>Chọn ảnh</b> rồi ấn <b>Bắt Đầu</b>.
	</div>
	<div class="dialogFooter">
    	<ul class="upload-queue" id="upload-queue">
						<li style="display: none" />
		</ul>
    </div>
</div>

</td>
</tr>
<tr>
<td class="dialogFooter" style="height:40px;padding-right:10px;" align="right" valign="middle" id="done">
	<input style="width:135" type="button" name="btnCloseAndRefresh" id="btnCloseAndRefresh" value="Cập nhật danh sách" onClick="reload_page();upload_image = false;refresh();self.close();" class="inpBtn" onMouseOver="this.className='inpBtnOver';" onMouseOut="this.className='inpBtnOut'">
</td>
</tr>
</table>
</body>
</html>